const checkOther = item => item === '==!>' ? '其他' : item 

const getVal = item => 
  item instanceof Object
   ? checkOther(item.val)
   : checkOther(item)

export default function getOptionList(options) {
  if (options && options.length > 0) {
    const list = JSON.parse(options).map(getVal)
    return {
      list,
      hasOther: list[list.length - 1] === '其他'
    }
  }
  else {
    return {list: [], hasOther: false}
  }
}